package com.cuitrip.util;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.cuitrip.business.setting.SubmitSuccessActivity;
import com.cuitrip.business.setting.model.SubmitSuccessModel;
import com.cuitrip.business.tripservice.model.ServiceInfo;
import com.cuitrip.business.user.model.CtUserInfo;
import com.cuitrip.service.R;
import com.lab.app.BaseFragment;

/**
 * Created by sheena on 16/5/18.
 */
public class JumpSuccessUtil {

    public static void navigate2CreateTripSucPage(BaseFragment fragment, int code){

        SubmitSuccessModel.ContentType type = SubmitSuccessModel.ContentType.CREATE_TRIP;
        String title = ResourceUtil.getString(R.string.feedback_submit_suc);
        String content = ResourceUtil.getString(R.string.trip_state_submission_desc_1);
        String actionText = ResourceUtil.getString(R.string.operation_ok_1);
        SubmitSuccessModel submitSuccessModel = new SubmitSuccessModel(type, title, content, actionText);
        SubmitSuccessActivity.launchSuccessPage(fragment, submitSuccessModel,code);
    }

    public static void navigete2CompletInsiderInfoPage(BaseFragment fragment, ServiceInfo mServiceInfo, CtUserInfo userInfo, int type, int code){
        SubmitSuccessModel.ContentType contentType = SubmitSuccessModel.ContentType.COMPLETE_INSIDER_INFO;
        String content = ResourceUtil.getString(R.string.trip_list_profile);
        String actionText = ResourceUtil.getString(R.string.trip_operation_profile_submit_2);
        SubmitSuccessModel submitSuccessModel = new SubmitSuccessModel(contentType,"", content, actionText);
        Bundle bundle = new Bundle();
        bundle.putSerializable(ServiceInfo.KEY,mServiceInfo);
        bundle.putSerializable(CtUserInfo.KEY,userInfo);
        bundle.putInt("type",type);
        SubmitSuccessActivity.launchSuccessPage(fragment, submitSuccessModel,code,bundle);
    }
}
